CREATE TABLE [dbo].[vid_zaniat]
(
[iK_vid_zanyat] [int] NOT NULL IDENTITY(1, 1),
[ikTypeZanyat] [int] NOT NULL,
[iK_type_vz] [int] NOT NULL,
[cName_vid_zanyat] [varchar] (50) COLLATE Cyrillic_General_CI_AS NOT NULL,
[cshort_vid_zanyat] [varchar] (20) COLLATE Cyrillic_General_CI_AS NULL,
[lTema] [bit] NULL,
[bit_priznak_decompose] [bit] NULL,
[bit_nagr] [bit] NULL,
[bit_must_be_in_uch_plan] [bit] NULL,
[Approved] [bit] NULL,
[Storage] [bit] NULL
)
GO
ALTER TABLE [dbo].[vid_zaniat] ADD CONSTRAINT [PK_vid_zaniat] PRIMARY KEY CLUSTERED  ([iK_vid_zanyat]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[vid_zaniat] ADD CONSTRAINT [IX_vid_zaniat] UNIQUE NONCLUSTERED  ([cName_vid_zanyat]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[vid_zaniat] ADD CONSTRAINT [IX_vid_zaniat_short] UNIQUE NONCLUSTERED  ([cshort_vid_zanyat]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[vid_zaniat] WITH NOCHECK ADD CONSTRAINT [FK_vid_zaniat_typ_zan] FOREIGN KEY ([iK_type_vz]) REFERENCES [dbo].[typ_zan] ([iK_type_vz])
GO
ALTER TABLE [dbo].[vid_zaniat] ADD CONSTRAINT [FK_vid_zaniat_TypeZanyat] FOREIGN KEY ([ikTypeZanyat]) REFERENCES [dbo].[TypeZanyat] ([ikTypeZanyat])
GO
